php code to generate thunderbolt express whirlwind links from addresses [passed test]
- 2020-05-05 11:00:08
- OfStack
Online demo address: http: / / tools jb51. net/tools/cs php
<?php
function zhuanhuan() {
$urlodd=explode('//',$_GET["url"],2);// Divide links into 2 Section, // The first paragraph is in front and the second paragraph is behind
$head=strtolower($urlodd[0]);//PHP Case sensitive, convert to lowercase first, otherwise appear HtTp: or ThUNDER: This weird way of writing is hard to deal with
$behind=$urlodd[1];
if($head=="thunder:"){
$url=substr(base64_decode($behind), 2, -2);//base64 Decrypt, remove the front AA And the back ZZ
}elseif($head=="flashget:"){
$url1=explode('&',$behind,2);
$url=substr(base64_decode($url1[0]), 10, -10);//base64 Decrypt, remove the front and back [FLASHGET]
}elseif($head=="qqdl:"){
$url=base64_decode($behind);//base64 decryption
}elseif($head=="http:"||$head=="ftp:"||$head=="mms:"||$head=="rtsp:"||$head=="https:"){
$url=$_GET["url"];// General address is supported only http,https,ftp,mms,rtsp Transport protocols, other places seem to be few, like XX Network disk is actually based on base64 , but some decryption also can not download
}else{
echo " This page does not currently support this protocol ";
}
return $url;
}
if($_GET["url"]!=NULL){
$url=zhuanhuan($_GET["url"]);
$url_thunder="thunder://".base64_encode("AA".$url."ZZ");//base64 Encryption, down here 2 Is the same
$url_flashget="Flashget://".base64_encode("[FLASHGET]".$url."[FLASHGET]")."&aiyh";
$url_qqdl="qqdl://".base64_encode($url);
}
?>
<form action=cs.php method=GET>
jb51.net Please enter normal links or thunderbolt , Express train, whirlwind chain address :
<input type=text name="url" size="80">
<input type=submit value=" conversion ">
</form>
<p> Actual address: <a href="<?php echo $url;?>" target="_blank"><?php echo $url;?></a>
<p> Thunderbolt chain: <a href="<?php echo $url_thunder;?>" target="_blank"><?php echo $url_thunder;?></a>
<p> Express chain: <a href="<?php echo $url_flashget;?>" target="_blank"><?php echo $url_flashget;?></a>
<p> A whirlwind chain: <a href="<?php echo $url_qqdl;?>" target="_blank"><?php echo $url_qqdl;?></a>